/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.brucexx.assistx.search.index;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 *
 * @author zhao.xiong
 */
public class TaskInfo {

    private String taskName;
    private String localDir;
    private String rootURL;
    private String user;
    private String pwd;

    /**
     * @return the taskName
     */
    public String getTaskName() {
        return taskName;
    }

    /**
     * @param taskName the taskName to set
     */
    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    /**
     * @return the localDir
     */
    public String getLocalDir() {
        return localDir;
    }

    /**
     * @param localDir the localDir to set
     */
    public void setLocalDir(String localDir) {
        this.localDir = localDir;
    }

    /**
     * @return the rootURL
     */
    public String getRootURL() {
        return rootURL;
    }

    /**
     * @param rootURL the rootURL to set
     */
    public void setRootURL(String rootURL) {
        this.rootURL = rootURL;
    }

    /**
     * @return the user
     */
    public String getUser() {
        return user;
    }

    /**
     * @param user the user to set
     */
    public void setUser(String user) {
        this.user = user;
    }

    /**
     * @return the pwd
     */
    public String getPwd() {
        return pwd;
    }

    /**
     * @param pwd the pwd to set
     */
    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Override
    public int hashCode(){
        return  new String(taskName).hashCode();
    }

    @Override
    public boolean equals(Object o){
        if(o.getClass()!=this.getClass()){
            return false;
        }
        return o.equals(this);
    }

    @Override
    public String toString(){
        return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
